package com.shenzhen.horselive.adapter;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.flqy.baselibrary.utils.GlideHelper;
import com.shenzhen.horselive.R;
import com.shenzhen.horselive.beans.NewsBean;

import org.jetbrains.annotations.NotNull;

public class LainTongAdapter extends BaseQuickAdapter<NewsBean.DataBean,BaseViewHolder> {
    public LainTongAdapter(int layoutResId) {
        super(layoutResId);
    }
    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsBean.DataBean s) {
        GlideHelper.loadRoundImage(baseViewHolder.getView(R.id.img_img),s.getSketch());
        baseViewHolder.setText(R.id.tv_name,s.getTitile())
        .setText(R.id.tv_time,s.getCreateTime().split(" ")[0])
        .setText(R.id.tv_author,s.getIssuer())
        ;
    }
}
